obj-$(CONFIG_SB_CORE)   += core/
obj-$(CONFIG_SB_CLI)    += cli/
obj-$(CONFIG_SB_DRIVER) += driver/

CFLAGS += -I$(CURDIR)/common

KCFLAGS += -I$(CURDIR)/core -I$(CURDIR)/common -include compat.h

ifeq ($(CONFIG_QORIQ),y)
KCFLAGS += -DQORIQ
endif
ifeq ($(CONFIG_LAYERSCAPE),y)
KCFLAGS += -DLAYERSCAPE
endif
ifeq ($(CONFIG_SB_PLATFORM_TIME),y)
KCFLAGS += -DPLATFORM_TIME
endif

ifeq ($(CONFIG_SB_DRIVER),y)
build-driver: build-core
endif

$(eval $(call install,examples/,full_speed.sh,$(DESTDIR)$(datadir)/simplebits/,full_speed.sh,0755))
$(eval $(call install,examples/,flow_control.sh,$(DESTDIR)$(datadir)/simplebits/,flow_control.sh,0755))
